<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ include file="../../Include/Config.jsp"%>
<html>
  <head>
    <title>Web Ram Program</title>
    <meta http-equiv="Content-Type" content="text/jsp; charset=utf-8">
    <link href="ram/style.css" rel="stylesheet" type="text/css">
      <script type="text/javascript" src="js/jquery-1.7.1.js" ></script>
      <script type="text/javascript" >
      
      $(document).ready(function(){ 
      	$('body').keypress(function(e){
      	if(e.keyCode!=13) return;
      	 if(!$('input[name="search"]').val()) $('input[name="search"]').focus();
      	    var memName = $("#searchContent").val();
              $("#memName").val(memName);
      	  $('form:eq(0)').submit();
      	 });
      	});
      
      $(function(){
          $("#searchImg").css("cursor","pointer").click(function(){
               var memName = $("#searchContent").val();
                   $("#memName").val(memName);
                   $("form")[0].submit();                   
          });
      });
    </script>
  </head>
  <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  <form action="member-submit.do" method="post">
     <input type="hidden" name="method" value="list" />
     <html:hidden styleId="memName" name="memberForm" property="memName" />
  </form>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="60">
          <!----- header ----------->
          <%@ include file="../../Include/Header.jsp"%>
          <!----- header end ----------->
        </td>
      </tr>
      <tr>
        <td>
          <div align="left">
            <table width="1251" border="0" cellpadding="0" cellspacing="0">
              <tr valign="top">
                <td width="180" height="473">
                  <%@ include file="../../Include/Admin_Left.jsp"%>
                </td>
                <td width="20">&nbsp;</td>
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                        <!----<table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><img src="../images/title_member01.jpg" width="161" height="30"></td>
                            <td height="30" align="center" bgcolor="#333333"><font color="#FFFFFF"><strong>회원 관리</strong></font></td>
                          </tr>
                          <tr>
                            <td height="1" bgcolor="f44901"></td>
                          </tr>
                          <tr>
                            <td bgcolor="#f4f4f4">
                              <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                <tr>
                                  <td valign="top">
                                    <p align="right">Home&gt;Admin&gt;회원관리</p>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>--->
						<img src="ram/images/member-list.jpg">
                      </td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="25">
                        <table width="100%" cellpadding="5" cellspacing="0">
                          <tr>
                            <td width="80%">
                              <b style="color:#ff3300">전체:</b> <b>${requestScope.totalCount}</b> 건
                            </td>
                            <td width="20%" align="right"><a href="member-form.do"><img src="ram/images/btn_input.jpg" border="0"></a></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td bgcolor="#dddddd">
                        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
                          <tr bgColor=#F4F4F4 height=30 align="center">
                            <td width="50" height="30" align=center><b>번호</b></td>
                            <td width="101" align=center><b>등록날짜</b></td>
                            <td width="635">
                              <p><b>회원명</b></p>
                            </td>
                            <td width="123"><b>등급</b></td>
                            <td width="86">
                              <p><b>승인</b></p>
                            </td>
                          </tr>
                          <logic:iterate id="list" name="memberList" indexId="count">
                            <tr align=middle bgcolor="#ffffff" style="color: #555555" onmouseover='this.style.backgroundColor="#f5f5f5"' onmouseout='this.style.backgroundColor="#FFFFFF"' height=25>
                              <td align=center width="50">${totalCount-count}</td>
                              <td align=center width="101">${list.memRegDate}</td>
                              <td align=center width="635">
                                <p><a href="member-submit.do?method=info&amp;memId=${list.memId}">${list.memName}</a></p>
                              </td>
                              <td align=center width="123">
                                <logic:equal name="list" property="memLevel" value="0">
                                       일반
                                </logic:equal>
                                <logic:equal name="list" property="memLevel" value="1">
                                        관리자
                                </logic:equal>
                              </td>
                              <td align=center width="86">
                                <p>
                                  <bean:write name="list" property="memOk" />
                                </p>
                              </td>
                            </tr>
                          </logic:iterate>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td height="30" align="center">
                        <b>[1]</b>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <select name='find'>
                          <option value="address">회원명</option>
                        </select>
                        <input type='Text' size='15' id="searchContent" name="search"  class="grayform" >
                          <img id="searchImg" src="ram/images/btn_search.jpg" align="absmiddle" border="0">
                      </td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                <p>&nbsp;</p>
              </td>
            </tr>
          </table>
        </div>
      </td>
    </tr>
    <tr>
      <td align="center">
        <%@ include file="../../Include/Foot.jsp"%>
      </td>
    </tr>
  </table>
</body>
</html>